package com.geektime.hello.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

/**
 * @Author: DRevelation
 * @Date: 2021/5/6 13:40
 * 订阅者2
 */
@Slf4j
@Service
public class EmailService implements ApplicationListener<UserRegisterEvent> {

    @Override
    public void onApplicationEvent(UserRegisterEvent event) {
        log.info("[onApplicationEvent][给用户({})发送邮件]", event.getUsername());
    }

}
